<?php
declare (strict_types = 1);

namespace app\model;

use think\Model;

/**
 * @mixin \think\Model
 */
class Alg extends Model
{
    //
    public function searchIdAttr($query, $value)
    {
        return $value ? $query->where('id', $value) : '';
    }

    //username搜索器
    public function searchWxidAttr($query, $value)
    {
        return $value ? $query->where('wxid',$value) : '';
    }

    //position 获取器
    public function getStausAttr($value) {
        $status = [
            1=>'未成熟',
            2=>'成熟',
            3=>'收取成功',
        ];
        return $status[$value];
    }

}
